<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ page import="org.apache.shiro.web.filter.authc.FormAuthenticationFilter"%>
<%@ page import="com.igd.utils.PropertiesUtil" %>

<%
	String errorClassName = (String)request.getAttribute(FormAuthenticationFilter.DEFAULT_ERROR_KEY_ATTRIBUTE_NAME);

	String errMsg = "";

	if(null !=errorClassName && !errorClassName.equals("")){
		
		System.out.println(errorClassName);
		
		PropertiesUtil p = PropertiesUtil.getInstance();
		
		errMsg = p.getVal(p.getResourceBundle("resources"),errorClassName).getValue();
		
		System.out.println(errMsg);
	}
	
	String basePath = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><s:text name="application.loginTitle"/></title>
<link href="<%=basePath%>/css/dwz/themes/css/login.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
	function refreshCode(obj){
		obj.src = obj.src + "?v="+Math.random();
	}
</script>
</head>
<body>
	<div id="login">
		<div id="login_header">
			<h1 class="login_logo">
				<a href="#"><img src="<%=basePath%>/css/dwz/themes/default/images/login_logo.gif" /></a>
			</h1>
			<div class="login_headerContent">
				<div class="navList">
					<ul>
						<li><a href="#">设为首页</a></li>
						<li><a href="#">反馈</a></li>
						<li><a href="#" target="_blank">帮助</a></li>
					</ul>
				</div>
				<h2 class="login_title"><img src="<%=basePath%>/css/dwz/themes/default/images/login_title.png" /></h2>
			</div>
		</div>
		<div id="login_content">
			<div class="loginForm">
				<p><%=errMsg%></p>
				<form action="<%=basePath%>/common/login.action" method="post">
					<p>
						<label><s:text name="application.login.userName"/></label>
						<input type="text" name="username" size="20" class="login_input" />
					</p>
					<p>
						<label><s:text name="application.login.password"/></label>
						<input type="password" name="password" size="20" class="login_input" />
					</p>
					<p>
						<label><s:text name="application.login.code"/></label>
						<input class="code" type="text" name="captcha" size="5" maxlength="4"/>
						<span><img src="<%=basePath %>/randomKey/loginRandomKey.action" onclick="refreshCode(this)" alt="登录认证码" width="75" height="24"/></span>
					</p>
					<div class="login_bar">
						<input class="sub" type="submit" value=""/>
					</div>
				</form>
			</div>
			<div class="login_banner"><img src="<%=basePath%>/css/dwz/themes/default/images/login_banner.jpg" /></div>
			<div class="login_main">
				<ul class="helpList">
					<li><a href="#">下载驱动程序</a></li>
					<li><a href="#">如何安装密钥驱动程序？</a></li>
					<li><a href="#">忘记密码怎么办？</a></li>
					<li><a href="#">为什么登录失败？</a></li>
				</ul>
				<div class="login_inner">
					<p>您可以使用 网易网盘 ，随时存，随地取</p>
					<p>您还可以使用 闪电邮 在桌面随时提醒邮件到达，快速收发邮件。</p>
					<p>在 百宝箱 里您可以查星座，订机票，看小说，学做菜…</p>
				</div>
			</div>
		</div>
		<div id="login_footer">
			Copyright &copy; 2013 IGDPlafrom. All Rights Reserved.
		</div>
	</div>
</body>
</html>